<div ng-controller="versionController">
    <div id="toolbar" class="selece_tj" style="float: right; margin: 20px 28px 20px 0px; cursor: pointer">
        <!--<button id="btn_add" type="button" class="btn btn-default" data-toggle="modal" data-target="#versioninsert" ng-click="versionSaveDialog()">-->
            <!--<span class="glyphicon glyphicon-plus" aria-hidden="true" ></span>新 增-->
        <!--</button>-->

        <a id="btn_add"  class="unit-btnSelect" style="font-size: 14px;"
           data-toggle="modal" aria-hidden="true" data-target="#versioninsert" ng-click="versionSaveDialog()">新 增</a>
    </div>
    <div class="query_table">
        <table class="table table-bordered table-striped">
            <tr>
                <td>版本名称</td>
                <td>版本号1</td>
                <td>版本号2</td>
                <td>版本号3</td>
                <td>版本号4</td>
                <td>操作</td>
            </tr>
            <tr class="click" ng-repeat="version in HardWare">
                <td ng-bind="version.name"></td>
                <td ng-bind="version.firstCode"></td>
                <td ng-bind="version.secondCode"></td>
                <td ng-bind="version.thirdCode"></td>
                <td ng-bind="version.forthCode"></td>
                <td>
                    <a data-toggle="modal" style="cursor: pointer; margin-right: 20px;"
                       data-backdrop="static" data-target="#versionimprint" ng-click="versionImprint(version.id)">版本说明</a>
                    <a data-toggle="modal" style="cursor: pointer"
                       data-backdrop="static"  ng-click="versionFile(version.id)">下载</a>
                </td>
            </tr>
        </table>
    </div>

    <!--新增版本信息-->
    <div id="versioninsert" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="addUserLabel">版本信息</h4>
        </div>
        <div class="modal-body">
            <div class="container" style="width:600px; padding-bottom:20px">
                <div class="add-user-model1">
                    <p>
                        <span>版本文件：</span><input id="versionToUpload" name="file" type="file"/><br>
                        <i style="color: #959595;padding-left: 20px;">(* 请上传.tar.gz格式文件)</i>
                    <div class="col-md-12">
                        <img id="versionfile" src=""
                             style="max-width:200px;max-height:200px;margin:0 auto;display:block;"/>
                    </div>
                    </p>
                    <p>
                        <span>版本名称：</span><input type="text" ng-model="insertVersion.name"/>
                    </p>
                    <p>
                        <span>版本号1：</span><input type="text" ng-model="insertVersion.code_first"/>
                        <span>版本号2：</span><input type="text" ng-model="insertVersion.code_second"/>
                    </p>
                    <p>
                        <span>版本号3：</span> <input type="text" ng-model="insertVersion.code_third"/>
                        <span>版本号4：</span> <input type="text" ng-model="insertVersion.code_forth"/>
                    </p>
                    <p style=" width:100%;">
                        <span>版本说明：</span>
                        <textarea style="height: 100px; width: 500px !important;resize: none;" ng-model="insertVersion.message"></textarea>
                    </p>
                    <p class="add-userModel">
                        <span>更新方式：</span>
                        <input type="radio" name="type" ng-model="insertVersion.type"  value="01"/><i>立即更新</i>
                        <input type="radio" name="type" ng-model="insertVersion.type"  value="02"/><i>自动更新</i>
                    </p>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关 闭</button>
            <button class="btn btn-primary"  data-dismiss="modal" aria-hidden="true" ng-click="versionSave()">保 存</button>
        </div>
    </div>

    <!-- 版本详细说明弹出框-->
    <div id="versionimprint" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="deleteUnitLable" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4>版本详细说明</h4>
        </div>
        <div class="modal-body" style="min-height: 50px !important;">
            <div class="container" style="width:500px;">
                <div class="add_tj">
                    <p id="versionabout" style="width: 100%; height: 150px; font-size: 14px; overflow-y: auto;" disabled>
                        {{versionmessage.message}}
                    </p>

                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关 闭</button>
            <!--<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true" ng-click="">保 存</button>-->
        </div>
    </div>

    <!--下载文件确定-->
    <div id="versiondown" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="updateUserPwdLabel"
         aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="updateUserPwdLabel">文件下载</h4>
        </div>
        <div class="modal-body" style="width: 500px; min-height: 100px !important; ">
            <p style=" height:40px; text-align: center; font: 20px/40px '微软雅黑'; -webkit-margin-before:30px!important;">确定下载文件？</p>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
            <button class="btn btn-primary"  data-dismiss="modal" aria-hidden="true" ng-click="downfile(version)">确 定</button>
        </div>
    </div>



</div>